import { Request, Response, NextFunction } from 'express';

export const i18nMiddleware = (req: Request, res: Response, next: NextFunction) => {
  const lang = req.headers['accept-language']?.toLowerCase().includes('en') ? 'en' : 'zh';
  (req as any).lang = lang;
  next();
};
